﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RMS.Utils.BootStrapper.Configuration;

namespace RMS.Utils.BootStrapper
{
    public class BootStrapper 
    {
        public static void Run()
        {
            foreach (BootStrapperTask bootStrapperTaskElement in BootStrapperSection.Instance.BootStrappers)
            {
                var bootstrapperTask = Activator.CreateInstance(bootStrapperTaskElement.Assembly) as IBootStrapperTask;
                if (bootstrapperTask != null) bootstrapperTask.Execute();
            }
        }
    }
}
